package com.inspiration.service;

import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.inspiration.dao.CategoryMapper;
import com.inspiration.entity.Category;
import com.inspiration.entity.Tag;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

/**
 * @Description
 * @Author Vincent.jiao
 * @Date 2023/10/24 11:55
 */
@Service
public class CategoryService {
    @Autowired
    CategoryMapper categoryMapper;

    public int count() {
        return categoryMapper.selectCount(new LambdaQueryWrapper<>());
    }

    public List<Category> list(LambdaQueryWrapper queryWrapper) {
        return  categoryMapper.selectList(queryWrapper);
    }
}
